﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="author" content="ISUX">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>工会人员查询</title>
    <link rel="stylesheet" href="/ViewMob/css/wxui.css">
    <link rel="stylesheet" href="/ViewMob/css/group.css">
    <link href="//at.alicdn.com/t/font_qqztt1cpq09kke29.css" rel="stylesheet" />
    <link href="/ViewMob/js/layer/need/layer.css" rel="stylesheet" />
    <script src="/ViewMob/js/layer/layer.m.js"></script>
    <style>
        .ms-controller, [ms-controller] {
            display: none;
        }

        .page {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            opacity: 0;
            z-index: 1;
        }

            .page.js_show {
                opacity: 1;
            }

        .page__hd {
            padding: 24px;
            text-align: center;
            background: #4faeff url(../images/bg-account.jpg) 100% 100%;
            color: white;
        }

        .page__bd_spacing {
            padding: 0 15px;
        }

        .page__ft {
            padding-top: 40px;
            padding-bottom: 10px;
            text-align: center;
        }

            .page__ft img {
                height: 19px;
            }

            .page__ft.j_bottom {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
            }

        .page__title {
            text-align: left;
            font-size: 20px;
            font-weight: 400;
        }

        .page__desc {
            margin-top: 5px;
            text-align: left;
            font-size: 14px;
        }

        .page.home .page__intro-icon {
            margin-top: -.2em;
            margin-left: 5px;
            width: 16px;
            height: 16px;
            vertical-align: middle;
        }

        .page.home .page__title {
            font-size: 0;
            margin-bottom: 15px;
        }


        .head-oneself {
            width: 4.5rem;
            height: 4.5rem;
            margin-left: 20px;
        }

            .head-oneself img {
                border: 2px solid rgba(0,0,0,.2);
            }

        .ybl {
            background-color: #10c55b;
            font-size: 30px;
            color: white;
        }

        .wbl {
            background-color: lightgray;
            font-size: 20px;
            color: white;
        }

        .YZ {
            POSITION: absolute;
            RIGHT: 10PX;
            TOP: 10PX;
            FONT-SIZE: 70PX;
            COLOR: #ff0000;
            line-height: 70px;
        }
    </style>
</head>
<body style="background-color: #f8f8f8;" ms-controller="GHCX">
    <div class="page__hd">
        <h1 class="page__title">班级信息</h1>
    </div>
    <div class="page__bd">
        <!--<a href="javascript:;" class="weui-btn weui-btn_primary">点击展现searchBar</a>-->
        <div class="weui-search-bar weui-search-bar_focusing" id="searchBar">
            <form class="weui-search-bar__form">
                <div class="weui-search-bar__box">
                    <i class="weui-icon-search"></i>
                    <input type="search" class="weui-search-bar__input" id="searchInput" ms-duplex="searchkey" ms-on-change="change()" placeholder="输入姓名" required="">
                    <a href="javascript:" class="weui-icon-clear" id="searchClear" ms-click="clear()"></a>
                </div>
                <label class="weui-search-bar__label weui-search-bar_focusing" id="searchText">
                    <i class="weui-icon-search"></i>
                    <span>搜索</span>
                </label>
            </form>
            <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel" ms-click="query()">搜索</a>
        </div>


        <div class="weui-panel" style="margin-top: 0px;" id="xb" ms-if="!searchkey">
            <div class="weui-panel__hd" style="font-size: 14px;">
                <span ms-click="godata(null,'')">所有工会></span>
                <span ms-if="selgh" ms-click="godata(null,'gh')">{{selgh}}({{arrxs.size()}})</span>
            </div>
            <div class="weui-panel__bd">
                <div class="weui-media-box weui-media-box_small-appmsg">
                    <div class="weui-cells" ms-repeat-item="arrgh" ms-click="godata(item,'gh')" ms-if-loop="datatype==''">
                        <a class="weui-cell weui-cell_access" href="javascript:;">
                            <div class="weui-cell__hd">
                            </div>
                            <div class="weui-cell__bd weui-cell_primary">
                                <p>{{item.mc}}({{item.rs}})</p>
                            </div>
                            <span class="weui-cell__ft"></span>
                        </a>

                    </div>

                </div>
                <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg selxs" ms-repeat-item="arrxs" ms-click="godata(item,'xs')">
                    <div class="weui-media-box__hd">
                        <img ms-attr-src="/images/xszp/{{item.jsdm}}.jpg" onerror="javascript:this.src='/ViewMob/images/tx1.gif';" class="weui-media-box__thumb" src="/ViewMob/images/tx1.gif" alt="" style="border-radius: 10%;">
                    </div>
                    <div class="weui-media-box__bd">
                        <h4 class="weui-media-box__title">{{item.jsmc}}({{item.xb}})</h4>
                        <p class="weui-media-box__desc">{{item.jysmc}}</p>
                    </div>
                    <span class="weui-cell__ft">{{item.hymc}}</span>
                </a>
            </div>
        </div>

        <div class="weui-panel weui-panel_access" ms-if="searchkey" style="margin-top: 0px;">
            <div class="weui-panel__hd">点击搜索查找新生信息,只显示匹配得前30个新生信息</div>
            <div class="weui-panel__bd">
                <a href="javascript:void(0);" ms-repeat-item="ssdata" class="weui-media-box weui-media-box_appmsg" ms-click="godata(item,'xs')" ms-if-loop="$index<30">
                    <div class="weui-media-box__hd">
                        <img ms-attr-src="/images/xszp/{{item.jsdm}}.jpg" onerror="javascript:this.src='/ViewMob/images/tx1.gif';" class="weui-media-box__thumb" src="/ViewMob/images/tx1.gif" alt="" style="border-radius: 10%;">
                    </div>
                    <div class="weui-media-box__bd">
                        <h4 class="weui-media-box__title">{{item.jsmc}}({{item.xb}})</h4>
                        <p class="weui-media-box__desc">{{item.jysmc}}</p>
                    </div>
                    <!--                    <span class="weui-cell__ft">{{item.hymc}}</span>-->
                </a>

            </div>
            <div class="weui-panel__ft" style="display: none">
                <a href="javascript:void(0);" class="weui-cell weui-cell_access weui-cell_link">
                    <div class="weui-cell__bd">查看更多</div>
                    \
                    <span class="weui-cell__ft"></span>
                </a>
            </div>
        </div>
    </div>

    <script src="/ViewMob/js/zepto.min.js"></script>
    <script src="/ViewMob/js/weui.min.js"></script>
    <script src="/ViewMob/js/avalon1.47.js"></script>
    <script type="text/javascript" class="searchbar js_show">
        var model = avalon.define({
            $id: "GHCX",
            selgh: "",
            datatype: "",
            searchkey: "",
            arrgh: [],
            arrxs: [],
            ssdata: [],
            clear: function () {
                model.searchkey = "";
                model.ssdata.clear();
            },
            change: function () {

            },
            query: function () {
                $.getJSON("/API/VIEWAPI.ashx?ACTION=GH_GHMDBYXM", { P1: model.searchkey }, function (result) {
                    model.ssdata = result.Result;
                })
            },
            godata: function (item, type) {
                if (type == 'xs') {
                    location.href = "UI_USERINFO.html?jsdm=" + item.jsdm;
                } else {
                    model.datatype = type;
                    if (item) {
                        if (type == 'gh') {
                            model.selgh = item.mc;
                            model.arrxs.clear();
                            $.getJSON("/API/VIEWAPI.ashx?ACTION=GH_GHMD", { P1: item.dm }, function (result) {
                                model.arrxs = result.Result;
                            })
                        }

                    } else {
                        if (type == '') {
                            model.selgh = "";
                        }
                    }
                }
            }
        })
        avalon.ready(function () {
            $.getJSON("/API/VIEWAPI.ashx?ACTION=GH_GHTJ", {}, function (result) {
                model.arrgh = result.Result;
            })

        })
    </script>
</body>
</html>
